package com.tcs.server.ipdata.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.google.common.collect.Lists;
import com.tcs.dao.ipdata.IpDataDao;
import com.tcs.model.ipdata.IpDataBean;
import com.tcs.server.ipdata.IpDataService;

@Service(value="ipDataService")
public class IpDataServiceImpl implements IpDataService {
	
	@Resource(name="ipDataDao")
	private IpDataDao ipDataDao;

	@Override
	public List<IpDataBean> queyListByParams(IpDataBean params) {
		List<IpDataBean> resultList = Lists.newArrayList();
		if (null != params) {
			resultList = ipDataDao.queyListByParams(params);
		}
		return resultList;
	}

	@Override
	public IpDataBean getOneByParams(IpDataBean params) {
		return null;
	}

	@Override
	public boolean insertOne(IpDataBean params) {
		return ipDataDao.insertOne(params);
	}

	@Override
	public boolean insertList(List<IpDataBean> parmas) {
		return ipDataDao.insertList(parmas);
	}

	@Override
	public boolean deleteByParams(IpDataBean params) {
		return ipDataDao.deleteByParams(params);
	}

	@Override
	public boolean updateByParams(IpDataBean params) {
		return false;
	}
	
	@Override
	public Integer count() {
		return ipDataDao.count();
	}
}